package com.example.springboot.service;

import com.example.springboot.entity.BookReservation;

import java.util.List;

/**
 * @author 30473
 * @description
 * @createDate 2025-10-24 20:31:41
 */
public interface IBookReservationService {
    int updateReservation(BookReservation reservation);

    /**
     * 新增预约信息
     *
     * @param bookReservation
     */
    void save(BookReservation bookReservation);


    /**
     * 预约查询（根据用户信息）
     */
    List<BookReservation> getReservationsByUserId(Long userId);

    /**
     * 预约查询（根据图书信息）
     */
    List<BookReservation> getReservationsByBookId(Long bookId);

    /**
     * 根据用户id和状态查询预约记录
     *
     * @param userId
     * @param status
     * @return
     */
    List<BookReservation> getReservationsByUserIdAndStatus(Long userId, String status);

    /**
     * 根据状态查询预约记录
     *
     * @param status
     * @return
     */
    List<BookReservation> getReservationsByStatus(String status);
}
